#pragma once


#include "wfx.h"
#include "TokenBasic.h"
#include "ProductionArg.h"
#include <vector>
#include <string>


MAKE_PTR(CProduction);

class CProduction
{
private:
    class IMPL;
public:

    CProduction(std::string str, boost::shared_ptr<IMPL> pIMPL);

    ~CProduction();

    /*
     *	These Api are used by GrammarAnalyze
     */
public:

    const std::vector<Token_Type>& Right();


    const Token_Type Left();


    int Length();

    /*
    *	These Api are used by Parser
    */
public:

    int ArgLength();

    CTokenPtr Reduce(CProductionArgPtr pArgs);


    /*
    *	These Api are used by Logger
    */
public:

    const char* toString();


protected:

    int m_argLength;

    std::string m_String;

    std::vector<Token_Type> m_Right;

    Token_Type m_Left;

    boost::shared_ptr<IMPL> m_pImplement;

    
};